package com.itheima.stock.api;


import com.itheima.stock.entity.StockBusiness;
import com.itheima.stock.entity.StockRtInfo;
import com.itheima.stock.response.ResponsePage;
import com.itheima.stock.response.ResponseResult;
import com.itheima.stock.vo.*;
import io.lettuce.core.dynamic.annotation.Param;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author zby
 * @created 2024-06-23 16:29
 * @description
 */
@RequestMapping(path = "/api/quot")
public interface StockControllerAPI {

    /**
     * 个股日K线详情
     * @param code
     */
    @GetMapping("/stock/screen/dkline")
    ResponseResult<List<StockDklineVO>> dkline(@RequestParam(name = "code") String code);

    /**
     * 个股分时K线行情
     */
    @GetMapping("/stock/screen/time-sharing")
    ResponseResult<List<StockTimeSharingVO>> timeSharing(@RequestParam(name = "code") String code);

    /**
     * 个股分时涨跌幅度统计
     */
    @GetMapping("/stock/updown")
    ResponseResult<StockStockUpDownVO> stockUpDown();

    /**
     * 成交量对比 T日和T-1日
     */
    @GetMapping("/stock/tradevol")
    ResponseResult<StockTradeAmtVO> tradeAmt();

    /**
     * 涨停统计
     */
    @GetMapping("/stock/updown/count")
    ResponseResult<StockCountVO<OptionVO>> count();

    /**
     * 分页查询股票信息
     */
    @GetMapping(path = "/stock/all")
    ResponseResult<ResponsePage<MoreAllVO>> stockAll(@RequestParam("page") Integer page,@RequestParam("pageSize") Integer pageSize);

    /**
     * 股票涨幅
     * @return
     */
    @GetMapping("/stock/increase")
    ResponseResult<List<StockUpdownVO>> stockIncrease();

    /**
     * 板块指数信息
     * @return
     */
    @GetMapping("/sector/all")
    ResponseResult<List<SectorAllVO>> sectorAll();

    /**
     * 查询国内大盘指数
     * @return
     */
    @GetMapping("/index/all")
    ResponseResult<List<MarketIndexVO>> innerIndexAll();


    @GetMapping(path = "/stock/business/all")
    ResponseResult<List<StockBusiness>> getStockBusiness();

}